package com.debao;

import com.debao.common.annotation.Anonymous;
import com.debao.common.core.domain.AjaxResult;
import com.debao.system.domain.ExcellentStudent;
import com.debao.system.service.IExcellentStudentService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/student")
@CrossOrigin
public class ApiStudent {

    @Resource
    private IExcellentStudentService excellentStudentService;

    @GetMapping("/list")
    @Anonymous
    public AjaxResult list(ExcellentStudent student){
        List<ExcellentStudent> excellentStudents = excellentStudentService.selectExcellentStudentList(student);
        return AjaxResult.success(excellentStudents);
    }
}
